package com.one.consumer.user.model;

import com.one.common.model.http.base.BaseResponse;
import com.one.consumer.user.model.item.AddressItem;
import com.one.consumer.user.model.item.LookUpItem;
import com.tencent.bugly.crashreport.biz.UserInfoBean;

import java.util.ArrayList;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/10/28 3:36 PM
 * description ：
 **/
public interface UserApi {

    /**
     * 地址---用户所有地址列表
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/getMemberAddress")
    Observable<BaseResponse<ArrayList<AddressItem>>> getAddressList(@FieldMap Map<String, String> params);

    /**
     * 地址----用户添加地址， 修改
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/insertAddress")
    Observable<BaseResponse<Object>> addAndUpdateAddress(@FieldMap Map<String, String> params);

    /**
     * 地址---用户删除地址
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/deleteAddress")
    Observable<BaseResponse<Object>> deleteAddress(@FieldMap Map<String, String> params);

    /**
     * 地址---用户修改默认地址
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/updateDefaultAddress")
    Observable<BaseResponse<Object>> defaultAddress(@FieldMap Map<String, String> params);

    /**
     * 地址---得到用户默认地址
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/getDefaultAddress")
    Observable<BaseResponse<AddressItem>> getDefaultAddress(@FieldMap Map<String, String> params);

    /**
     * 地址---用户得到地址详情
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/getAddressDetail")
    Observable<BaseResponse<AddressItem>> getAddressDetail(@FieldMap Map<String, String> params);

    /**
     * 发票----添加发票 ,修改 抬头
     */
    @FormUrlEncoded
    @POST("/invoiceInterfaces/v1.0/insertInvoice")
    Observable<BaseResponse<Object>> addInvoiceLookUp(@FieldMap Map<String, String> params);

    /**
     * 发票----设置默认发票 抬头
     */
    @FormUrlEncoded
    @POST("/invoiceInterfaces/v1.0/updateDefaultInvoice")
    Observable<BaseResponse<Object>> defaultInvoiceLookUp(@FieldMap Map<String, String> params);


    /**
     * 发票----发票列表 抬头
     */
    @FormUrlEncoded
    @POST("/invoiceInterfaces/v1.0/getMemberInvoice")
    Observable<BaseResponse<ArrayList<LookUpItem>>> getLookUpList(@FieldMap Map<String, String> params);

    /**
     * 发票----用户的默认发票详情 抬头
     */
    @FormUrlEncoded
    @POST("/invoiceInterfaces/v1.0/getDefaultInvoice")
    Observable<BaseResponse<LookUpItem>> getLookUpDefault(@FieldMap Map<String, String> params);

    /**
     * 发票----发票详情 抬头
     */
    @FormUrlEncoded
    @POST("/invoiceInterfaces/v1.0/getInvoiceDetail")
    Observable<BaseResponse<LookUpItem>> getLookUpDetail(@FieldMap Map<String, String> params);

    /**
     * 发票----删除发票
     */
    @FormUrlEncoded
    @POST("/invoiceInterfaces/v1.0/deleteInvoice")
    Observable<BaseResponse<Object>> deleteLookUp(@FieldMap Map<String, String> params);



}
